<?php
session_start();
$inactive = 3800;
if(isset($_SESSION['timeout']) )
{
	$session_life = time() - $_SESSION['timeout'];
	if($session_life > $inactive)
	{
		session_destroy();
		$gotoPage = Tool::curPageURL();
		$_SESSION['gotoPage'] = $gotoPage;
		header("Location: index.php?type=l&action=logout");
	}
}
$_SESSION['timeout'] = time();

$smarty = new Smarty();
$smarty->setTemplateDir(__DIR__.DIRECTORY_SEPARATOR . '..'.DIRECTORY_SEPARATOR.'view'.DIRECTORY_SEPARATOR.'templates');
$smarty->setCompileDir(__DIR__.DIRECTORY_SEPARATOR . '..'.DIRECTORY_SEPARATOR.'view'.DIRECTORY_SEPARATOR.'templates_c');
$templateDir = $smarty->getTemplateDir(0);

if (!file_exists(dirname(__FILE__).DIRECTORY_SEPARATOR.'../_config/setting/setting.ini'))
{
	echo "Configuration file not found!";
}
else
{
	require_once dirname(__FILE__).DIRECTORY_SEPARATOR.'../plugin/Config/Config.php';
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php

$templateDir = $smarty->getTemplateDir(0) ;

$smarty->assign('status',1);
if(isset($_SESSION['user']))
{
	//$status = $userService->getStatus($context, $result, $_SESSION['user']['ID']);
	//$smarty->assign('status',$status);
}
$smarty->assign('templateDir',$glb["websiteURL"]."/view/templates");
$smarty->assign('websiteURL',$glb["websiteURL"]);
$smarty->assign('get',$_GET);
$smarty->assign('templateDirFile',$templateDir);
$smarty->display($templateDir .DIRECTORY_SEPARATOR."temp1".DIRECTORY_SEPARATOR."head.tpl");
?>
</head>
<body>

<!-- Top Section -->
<div id="topsec"> 
	<!-- masterhead -->
	<?php 
		$smarty->display($templateDir . DIRECTORY_SEPARATOR."temp1".DIRECTORY_SEPARATOR."header.tpl");
	?>
	<!-- End Masterhead -->
	<div class="clear"></div>
</div>
<!-- End Top Section -->

<div class="clearfix" id="zt-slideshow">
	<?php 
  		$smarty->display($templateDir . DIRECTORY_SEPARATOR."temp1".DIRECTORY_SEPARATOR."slideShow.tpl");
  	?>		
</div>
<div class="clear"></div>

<div id="outer1">
  <div id="outer"> 
  
    <!-- Wapper Sec -->
    <div id="wrapper_sec"> 
      <!-- Content Seciton -->
      <div id="content_section">
      
        <div class="col1">
        	<?php 
		  		$smarty->display($templateDir . DIRECTORY_SEPARATOR."temp1".DIRECTORY_SEPARATOR."leftSide.tpl");
		  	?>
        </div>
        <div class="col2">
        	<?php 
		  		$smarty->display($templateDir . DIRECTORY_SEPARATOR."temp1".DIRECTORY_SEPARATOR."rightSide.tpl");
		  	?>	     
        	<!--col2 ends --> 
        </div>
        
        <div class="clear"></div>
      </div>
      <!-- End Content Seciton -->
      <div class="clear"></div>
    </div>
    <!-- End Wapper Sec -->
    
    <div class="clear"></div>
  </div>
</div>
<!-- Bototm seciton -->
<div id="bottomsec">
  <div id="footer"> 
    <!--Our Store-->
    <div class="our_store">
      <h3>Our Store</h3>
      <ul>
        <li><a href="#">About Us</a></li>
        <li><a href="#">Customer</a></li>
        <li><a href="#">Contacts</a></li>
        <li><a href="#">Site Map</a></li>
      </ul>
    </div>
    <!-- Useful Links -->
    <div class="footerdiv">
      <h3>Useful Links</h3>
      <ul>
        <li><a href="#">Site Map</a></li>
        <li><a href="#">Search Terms</a></li>
        <li><a href="#">Advanced Search</a></li>
        <li><a href="#">Contact Us</a></li>
      </ul>
    </div>
    <!-- My Accounts -->
    <div class="footerdiv">
      <h3>My Account</h3>
      <ul>
        <li><a href="./account.html">My Account</a></li>
        <li><a href="./shoppingcart.html">My Cart</a></li>
        <li><a href="./shoppingcart.html">Checkout</a></li>
        <li><a href="./login.html">Log In</a></li>
      </ul>
    </div>
    <!-- Pages -->
    <div class="footerdiv">
      <h3>Pages</h3>
      <ul>
        <li><a href="#">About Us</a></li>
        <li><a href="#">CMS Page</a></li>
        <li><a href="#">Another One</a></li>
      </ul>
    </div>
    <!-- Contact -->
    <div class="contact_us">
      <h3>Contact</h3>
      <ul>
        <li><a href="#">General Information</a></li>
        <li><a href="#">Frequently Asked Questions</a></li>
        <li><a href="#">Member Support Forum</a></li>
        <li class="social"> <a href="#"><img  src="./images/social_icon1.png" alt="" /></a> <a href="#"><img  src="./images/social_icon2.png" alt="" /></a> <a href="#"><img  src="./images/social_icon3.png" alt="" /></a> <a href="#"><img  src="./images/social_icon4.png" alt="" /></a> </li>
      </ul>
    </div>
    <div class="clear"></div>
    <div class="copyright" > &copy; 2011 - <a href="http://www.racktheme.com" target="_blank">RackTheme</a> - All rights reserved. </div>
  </div>
</div>
</body>
</html>
